<template>
	<div class="header" v-show="isNewVersion">
		{{msg}}
		<a @click="goback"></a>
		<i @click="wxshare" v-if="!type"></i>
		<label @click="goadvisory" v-if="type">去咨询</label>
	</div><div class="header-placeholder"></div>
</template>
<script>
	import toolPackage from '../resource/js/common/toolPackage'
	import './WxShare.vue'
	export default{
		data(){
			return {
				isNewVersion:true
			};
		},
		methods: {
			goback(){
				window.history.go(-1);
			},	
			goadvisory(){
				alert('去咨询');
			},	
			wxshare(){
				if(toolPackage.is_wxbrowser()){
					_that.$broadcast('init-share');
				}
			}	
		},
		ready(){
            var version=toolPackage.getAppVersionCode();
            if(version&&parseInt(version)<21000){
                this.isNewVersion=false;
            }
            if(this.type==1){

            }
		},
		props:['msg','type']
	}
</script>
<style lang="less" scoped>
@import '../resource/css/common/computed';
.header{position: fixed;.t(0);.l(0);width:100%;background:#fff;color:#333;.f(36rem);.t-c();.h(138rem);.l-h(170rem);border-bottom:1px solid #eee;z-index: 999;}
.header a{position: absolute;display: block;.b(24rem);.l(15rem);.w(54rem);.h(54rem);
background: url(../resource/img/back.png) no-repeat; background-size: 100%;}
.header i{position: absolute;display: block;.b(24rem);.r(20rem);.w(54rem);.h(54rem);
background: url(../resource/img/share.png) no-repeat; background-size: 100%;}
.header-placeholder{.h(138rem);}
.header label{position: absolute;display: block;.f(32rem);.b(24rem);.r(20rem);.w(110rem);.h(54rem);.l-h(54rem);color:#666;}
.header-placeholder{.h(138rem);}
</style>